package com.kede.pay.enumstatus;

import lombok.AllArgsConstructor;
import lombok.Getter;

/***
 ** @Author:Pr.li
 ** @Description:
 ** @Date: create in 2023/5/6 14:33
 ***/
@Getter
@AllArgsConstructor
public enum AppIdTypeEnum {
    USERAPP("USERAPP","用户端app","wxbc3097088c6cd8ba"),
    USER_XCX("USER_XCX","用户端小程序","wxfe5793144bbb2d8a"),
    QISHOU_XCX("QISHOU_XCX","骑手端小程序","wxcf703f0a5fc585e0"),
    MENDIAN_XCX("MENDIAN_XCX","门店端小程序","wxe033e647671049f5"),
    QUDAI_XCX("QUDAI_XCX","区代小程序","wxa45d2089dd5dde49"),
//    todo 将市代端的app 换成正确的
    SHIDAI_XCX("SHIDAI_XCX","市代小程序","wxa45d2089dd5dde49");

    String type;
    String name;
    String appid;

    /**
     * 根据type 获取当前枚举
     *
     * @Author: Pr.li
     * @Date: 2023/4/20 11:04
     * @Param: [String]
     * @Return: AppIdTypeEnum
     ***/
    public static AppIdTypeEnum valueOfCode(String type) {
        for (AppIdTypeEnum it : AppIdTypeEnum.values()) {
            if (it.getType().equals(type)) {
                return it;
            }
        }
        return null;
    }
}
